package com.example.enums.role;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum RoleStatus {

    NORMAL(0, "正常"),
    DISABLED(1, "停用");

    @EnumValue // 枚举值存储在数据库中
    private final Integer value;
    @JsonValue // 枚举值序列化时返回此字段
    private final String description;

}
